﻿using System.Collections.Generic;
using System.Linq;
using FPPrinter.Models.WpfDoc;

namespace FPPrinter.Models.Doc
{
    public class LongOptimizedDoc : OptimizedDocBase
    {
        public LongOptimizedDoc()
        {
            DoubleSidedPrint = true;
        }

        public override void Generate(IEnumerable<IImage> srcImages)
        {
            var pss = new List<IFPDocPage>();
            Images = srcImages;

            var images = srcImages.ToList();

            for (int i = 0; i < images.Count; i++)
            {
                var i1 = images[i];

                IFPDocPage p = new FpLongDocPage(i1);
                pss.Add(p);
            }

            base.Pages = pss;
            FixedDocWpf = this.ToFixedDocWpf();
        }
    }
}